<template>
  <div id="baseInfo">
    <el-descriptions class="margin-top" title="基本信息" :column="2"  border>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          账号
        </template>
        {{ user.userName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          昵称
        </template>
        {{ user.pickName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-gender"></i>
          性别
        </template>
        男
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-nianling"></i>
          年龄
        </template>
        {{ user.age }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-xueli"></i>
          学历
        </template>
        {{ user.edu }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-biyeyuanxiao"></i>
          毕业院校
        </template>
        {{ user.graduate }}
      </el-descriptions-item>

      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-juzhudi"></i>
          居住地
        </template>
        {{ user.liveCity }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-wodejianli"></i>
          状态
        </template>
        {{ user.expect }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          手机号
        </template>
        {{ user.tel }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-24gl-mailboxFull"></i>
          邮箱
        </template>
        {{ user.email }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-qq"></i>
          QQ
        </template>
        {{ user.qq }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-shenfenzheng"></i>
          身份
        </template>
        {{ user.companyName}}{{user.position}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="iconfont icon-gexingqianming"></i>
          个性签名
        </template>
        {{ user.introduce }}
      </el-descriptions-item>


    </el-descriptions>
  </div>
</template>

<script>

import {getPersonInfo} from "@/network/user";

export default {
  name: "BaseInfo",
  data(){
    return {
      user:'',
      userName:'',
    }
  },
  mounted() {
    if(localStorage.getItem("common_userName")){
     this.userName =localStorage.getItem("common_userName");
    }
    this.personInfo();
  },
  methods:{
    personInfo(){
      getPersonInfo(this.userName).then(res=>{
        this.user = res.data.data;
      })

    }
  }
}

</script>

<style scoped>
#baseInfo{
  padding:20px;
  background-color: white;
  height:464px;
  min-height:464px;
}
</style>